package com.iwop.moto.service;

import com.iwop.moto.model.FOrderPurchaseDetail;
import com.iwop.moto.model.MOrderPurchase;

import java.util.List;
import java.util.Map;

/**
 * Created by mobom on 2016/12/9.
 */

public interface MOrderPurchaseService {
    /**
     * @param mOrderPurchase 实体
     * @param detail 订单详情列表
     * */
    String insert(MOrderPurchase mOrderPurchase, String detail);

    /**
     * @param oid 订单id
     * @param status 订单状态
     * @param store_id 店铺id
     * */
    String updateOderPurchaseStatus(String oid, int status, String store_id);

    /**
     * @param seller_store_id 卖家店铺id
     * @param buy_store_id 买家店铺id
     * */
    List<MOrderPurchase> findOrderPurchaseList( String seller_store_id, String buy_store_id);

    /**
     * 获取订单与详情
     * oid 订单id
     * */
    MOrderPurchase getPurchaseDetail(String oid);

    /**
     * 获取订单
     * id 订单id
     * */
    MOrderPurchase findOneById(String oid);

    /**
     * 更新对象
     * */
    void updateOrderPurchase(MOrderPurchase out_trade_no);

    /**
     * 通过支付订单号查询
     * */
    MOrderPurchase findOneByPayOrderNo(String out_trade_no);

    MOrderPurchase findOneByOrderId(String payOrderNo);

    MOrderPurchase findOneByoutTradeNo(String order_id);

    MOrderPurchase findModerPurchaseByOid(String outTradeNo);

    List<FOrderPurchaseDetail> findPurchaseDetailByOid(String sid);
}
